<?php
	include "../functions.php";
	$str='';
	$str.=$_POST['title']."#@@#".$_POST['sex']."#@@#".$_POST['content']."#@@#".time()."\n";
	$data = file_get_contents("db.rdb");//获得数据库内容
	//将留言写入数据库
	if(file_put_contents("db.rdb", $data.$str)){
		echo "<script>alert(\"留言成功\");location.href='4.php';</script>";
	}
?>